package tests;

import java.io.File;
import java.io.IOException;

import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;

import junit.extensions.TestSetup;
import junit.framework.Test;

public class SizeTests extends TestSetup {
	public SizeTests(Test test) {
		super(test);
	}

	protected void tearDown() throws Exception {
		System.out.println("tearing down");
		JFreeChart chart = ChartFactory.createBarChart3D("All", "Library",
				"Bytes", CaliperTests.dataset, PlotOrientation.VERTICAL, true,
				true, true);

		try {
			ChartUtilities.saveChartAsJPEG(new File("Results/" + "ChartSizes"
					+ ".JPEG"), chart, 1200, 600);
		} catch (IOException e) {
			e.printStackTrace();

		}
	}

}
